package com.qijia.travel.domain.example;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


public class AccLogExample extends BaseExample{
    protected String orderByClause;

    protected List<Criteria> oredCriteria;

    public AccLogExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    protected AccLogExample(AccLogExample example) {
        this.orderByClause = example.orderByClause;
        this.oredCriteria = example.oredCriteria;
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
    }

    public static class Criteria {
        protected List<String> criteriaWithoutValue;

        protected List<Map<String, Object>> criteriaWithSingleValue;

        protected List<Map<String, Object>> criteriaWithListValue;

        protected List<Map<String, Object>> criteriaWithBetweenValue;

        protected Criteria() {
            super();
            criteriaWithoutValue = new ArrayList<String>();
            criteriaWithSingleValue = new ArrayList<Map<String, Object>>();
            criteriaWithListValue = new ArrayList<Map<String, Object>>();
            criteriaWithBetweenValue = new ArrayList<Map<String, Object>>();
        }

        public boolean isValid() {
            return criteriaWithoutValue.size() > 0
                || criteriaWithSingleValue.size() > 0
                || criteriaWithListValue.size() > 0
                || criteriaWithBetweenValue.size() > 0;
        }

        public List<String> getCriteriaWithoutValue() {
            return criteriaWithoutValue;
        }

        public List<Map<String, Object>> getCriteriaWithSingleValue() {
            return criteriaWithSingleValue;
        }

        public List<Map<String, Object>> getCriteriaWithListValue() {
            return criteriaWithListValue;
        }

        public List<Map<String, Object>> getCriteriaWithBetweenValue() {
            return criteriaWithBetweenValue;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteriaWithoutValue.add(condition);
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("condition", condition);
            map.put("value", value);
            criteriaWithSingleValue.add(map);
        }

        protected void addCriterion(String condition, List<? extends Object> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("condition", condition);
            map.put("values", values);
            criteriaWithListValue.add(map);
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            List<Object> list = new ArrayList<Object>();
            list.add(value1);
            list.add(value2);
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("condition", condition);
            map.put("values", list);
            criteriaWithBetweenValue.add(map);
        }

        public Criteria andAccLogIdIsNull() {
            addCriterion("acc_log_id is null");
            return this;
        }

        public Criteria andAccLogIdIsNotNull() {
            addCriterion("acc_log_id is not null");
            return this;
        }

        public Criteria andAccLogIdEqualTo(Integer value) {
            addCriterion("acc_log_id =", value, "accLogId");
            return this;
        }

        public Criteria andAccLogIdNotEqualTo(Integer value) {
            addCriterion("acc_log_id <>", value, "accLogId");
            return this;
        }

        public Criteria andAccLogIdGreaterThan(Integer value) {
            addCriterion("acc_log_id >", value, "accLogId");
            return this;
        }

        public Criteria andAccLogIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("acc_log_id >=", value, "accLogId");
            return this;
        }

        public Criteria andAccLogIdLessThan(Integer value) {
            addCriterion("acc_log_id <", value, "accLogId");
            return this;
        }

        public Criteria andAccLogIdLessThanOrEqualTo(Integer value) {
            addCriterion("acc_log_id <=", value, "accLogId");
            return this;
        }

        public Criteria andAccLogIdIn(List<Integer> values) {
            addCriterion("acc_log_id in", values, "accLogId");
            return this;
        }

        public Criteria andAccLogIdNotIn(List<Integer> values) {
            addCriterion("acc_log_id not in", values, "accLogId");
            return this;
        }

        public Criteria andAccLogIdBetween(Integer value1, Integer value2) {
            addCriterion("acc_log_id between", value1, value2, "accLogId");
            return this;
        }

        public Criteria andAccLogIdNotBetween(Integer value1, Integer value2) {
            addCriterion("acc_log_id not between", value1, value2, "accLogId");
            return this;
        }

        public Criteria andAccGuideIdIsNull() {
            addCriterion("acc_guide_id is null");
            return this;
        }

        public Criteria andAccGuideIdIsNotNull() {
            addCriterion("acc_guide_id is not null");
            return this;
        }

        public Criteria andAccGuideIdEqualTo(Integer value) {
            addCriterion("acc_guide_id =", value, "accGuideId");
            return this;
        }

        public Criteria andAccGuideIdNotEqualTo(Integer value) {
            addCriterion("acc_guide_id <>", value, "accGuideId");
            return this;
        }

        public Criteria andAccGuideIdGreaterThan(Integer value) {
            addCriterion("acc_guide_id >", value, "accGuideId");
            return this;
        }

        public Criteria andAccGuideIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("acc_guide_id >=", value, "accGuideId");
            return this;
        }

        public Criteria andAccGuideIdLessThan(Integer value) {
            addCriterion("acc_guide_id <", value, "accGuideId");
            return this;
        }

        public Criteria andAccGuideIdLessThanOrEqualTo(Integer value) {
            addCriterion("acc_guide_id <=", value, "accGuideId");
            return this;
        }

        public Criteria andAccGuideIdIn(List<Integer> values) {
            addCriterion("acc_guide_id in", values, "accGuideId");
            return this;
        }

        public Criteria andAccGuideIdNotIn(List<Integer> values) {
            addCriterion("acc_guide_id not in", values, "accGuideId");
            return this;
        }

        public Criteria andAccGuideIdBetween(Integer value1, Integer value2) {
            addCriterion("acc_guide_id between", value1, value2, "accGuideId");
            return this;
        }

        public Criteria andAccGuideIdNotBetween(Integer value1, Integer value2) {
            addCriterion("acc_guide_id not between", value1, value2, "accGuideId");
            return this;
        }
    }
}